package chaoyue.study.mapper;

import chaoyue.study.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author chaoyue
 * @since 2024-12-22
 */
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from `user` where `name` = #{name} for update")
    List<User> selectByNameForUpdate(String name);
}
